import { _decorator, Component, Label, Node, tween } from 'cc';
import { UIManager } from '../../../framework/ui/uimanager/UIManager';
import Design from '../../../common/src/util/Design';
const { ccclass, property } = _decorator;

@ccclass('TipToast')
export class TipToast extends Component {
    @property({type:Label, displayName: "标签"})
    public remindLabel: Label = null
    
    public setData(data) {
        this.remindLabel.string = data

        tween(this.node)
        .delay(Design.gameConfig.tipShowDuration)
        .call(() => {
            UIManager.close("tip:res/prefab/TipToast")
        })
        .start()
    }
}


